
public class GenderButton extends Component{

	public boolean state;
	public String label;
	////////////////////////////////////////////////////////////////////////////////////////////////////

	public GenderButton(int x,int y) {
		state = false;
		width =  20;
		height = 20;
		this.x=x;
		this.y=y;
	}

	public void draw()
	{
		GLOBAL.processing.textFont(GLOBAL.plotFont, 14);
		int cx = x;
		int cy = y;

		GLOBAL.processing.textAlign(GLOBAL.processing.LEFT);

		GLOBAL.processing.rectMode(GLOBAL.processing.CORNER);
		GLOBAL.processing.strokeWeight(1);
		GLOBAL.processing.stroke(GLOBAL.colorLines);
		GLOBAL.processing.fill(GLOBAL.processing.color(70,70,70,100));
		GLOBAL.processing.rect(x, y, width, height);


		if (state) {
			GLOBAL.processing.strokeWeight(2);
			GLOBAL.processing.stroke(GLOBAL.colorLines);
			GLOBAL.processing.line(x+5, y+5, x+width-5, y+height-5);
			GLOBAL.processing.line(x+5, y+height-5, x+width-5, y+5);
		}
		
		if((GLOBAL.analysisType == 1 || GLOBAL.analysisType == 0) 
				&& mouseOver()) 
		{
			super.draw();
			if(GLOBAL.processing.mousePressed)
			{
				GLOBAL.gu.drawBox(x, y, width, height, 0, GLOBAL.processing.color(150, 150, 200), 255);
				GLOBAL.gu.drawBox(x, y, width, height, 1, GLOBAL.processing.color(150, 150, 200), 150);
				cx += 2;
				cy += 2;

			}
		}

	}
	public void mouseClicked(){
		state = !state;
	}

	////////////////////////////////////////////////////////////////////////////////////////////////////

}
